<?php
class pageAlert {
	function __construct($module, $text, $type=PAGE_ALERT_ERROR) {
		
		$pageAlertsCount = count($module->xml->pageAlert);
		$module->xml->pageAlert[$pageAlertsCount] = $text;
		$module->xml->pageAlert[$pageAlertsCount]['type'] = $type;
		
		$module->engine->addTemplate(WIDGETS_TEMPLATES_PATH."pageAlert.xsl");
	}
}
?>